Optimal. Leaf size=117 \[ -\frac {b n}{6 e^2 (d+e x)^2}+\frac {b n}{6 d e^2 (d+e x)}+\frac {b n \log (x)}{6 d^2 e^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \log (d+e x)}{6 d^2 e^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {45, 2382, 12,
78} \begin {gather*} -\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}+\frac {b n \log (x)}{6 d^2 e^2}-\frac {b n \log (d+e x)}{6 d^2 e^2}+\frac {b n}{6 d e^2 (d+e x)}-\frac {b n}{6 e^2 (d+e x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 78
Rule 2382
Rubi steps
\begin {align*} \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx &=\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-(b n) \int \frac {-d-3 e x}{6 e^2 x (d+e x)^3} \, dx\\ &=\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {(b n) \int \frac {-d-3 e x}{x (d+e x)^3} \, dx}{6 e^2}\\ &=\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {(b n) \int \left (-\frac {1}{d^2 x}-\frac {2 e}{(d+e x)^3}+\frac {e}{d (d+e x)^2}+\frac {e}{d^2 (d+e x)}\right ) \, dx}{6 e^2}\\ &=-\frac {b n}{6 e^2 (d+e x)^2}+\frac {b n}{6 d e^2 (d+e x)}+\frac {b n \log (x)}{6 d^2 e^2}+\frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \log (d+e x)}{6 d^2 e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 135, normalized size = 1.15 \begin {gather*} \frac {d \left (a+b \log \left (c x^n\right )\right )}{3 e^2 (d+e x)^3}-\frac {a+b \log \left (c x^n\right )}{2 e^2 (d+e x)^2}-\frac {b n \left (\frac {1}{(d+e x)^2}+\frac {2}{d (d+e x)}+\frac {2 \log (x)}{d^2}-\frac {2 \log (d+e x)}{d^2}\right )}{6 e^2}+\frac {b n \left (\frac {1}{d (d+e x)}+\frac {\log (x)}{d^2}-\frac {\log (d+e x)}{d^2}\right )}{2 e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.14, size = 403, normalized size = 3.44
method | result | size |
risch | \(-\frac {b \left (3 e x +d \right ) \ln \left (x^{n}\right )}{6 \left (e x +d \right )^{3} e^{2}}-\frac {3 i \pi b \,d^{2} e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{3} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-3 i \pi b \,d^{2} e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b \,d^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b \,d^{3} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-3 i \pi b \,d^{2} e x \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+3 i \pi b \,d^{2} e x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 \ln \left (-x \right ) b \,e^{3} n \,x^{3}+2 \ln \left (e x +d \right ) b \,e^{3} n \,x^{3}-6 \ln \left (-x \right ) b d \,e^{2} n \,x^{2}+6 \ln \left (e x +d \right ) b d \,e^{2} n \,x^{2}-6 \ln \left (-x \right ) b \,d^{2} e n x +6 \ln \left (e x +d \right ) b \,d^{2} e n x -2 b d \,e^{2} n \,x^{2}+6 \ln \left (c \right ) b \,d^{2} e x -2 \ln \left (-x \right ) b \,d^{3} n +2 \ln \left (e x +d \right ) b \,d^{3} n -2 b \,d^{2} e n x +2 d^{3} b \ln \left (c \right )+6 a \,d^{2} e x +2 a \,d^{3}}{12 e^{2} d^{2} \left (e x +d \right )^{3}}\) | \(403\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 142, normalized size = 1.21 \begin {gather*} \frac {1}{6} \, b n {\left (\frac {x}{d x^{2} e^{3} + 2 \, d^{2} x e^{2} + d^{3} e} - \frac {e^{\left (-2\right )} \log \left (x e + d\right )}{d^{2}} + \frac {e^{\left (-2\right )} \log \left (x\right )}{d^{2}}\right )} - \frac {{\left (3 \, x e + d\right )} b \log \left (c x^{n}\right )}{6 \, {\left (x^{3} e^{5} + 3 \, d x^{2} e^{4} + 3 \, d^{2} x e^{3} + d^{3} e^{2}\right )}} - \frac {{\left (3 \, x e + d\right )} a}{6 \, {\left (x^{3} e^{5} + 3 \, d x^{2} e^{4} + 3 \, d^{2} x e^{3} + d^{3} e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 156, normalized size = 1.33 \begin {gather*} \frac {b d n x^{2} e^{2} - a d^{3} + {\left (b d^{2} n - 3 \, a d^{2}\right )} x e - {\left (b n x^{3} e^{3} + 3 \, b d n x^{2} e^{2} + 3 \, b d^{2} n x e + b d^{3} n\right )} \log \left (x e + d\right ) - {\left (3 \, b d^{2} x e + b d^{3}\right )} \log \left (c\right ) + {\left (b n x^{3} e^{3} + 3 \, b d n x^{2} e^{2}\right )} \log \left (x\right )}{6 \, {\left (d^{2} x^{3} e^{5} + 3 \, d^{3} x^{2} e^{4} + 3 \, d^{4} x e^{3} + d^{5} e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 661 vs.
\(2 (112) = 224\).
time = 6.02, size = 661, normalized size = 5.65 \begin {gather*} \begin {cases} \tilde {\infty } \left (- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {\frac {a x^{2}}{2} - \frac {b n x^{2}}{4} + \frac {b x^{2} \log {\left (c x^{n} \right )}}{2}}{d^{4}} & \text {for}\: e = 0 \\\frac {- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}}{e^{4}} & \text {for}\: d = 0 \\- \frac {a d^{3}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 a d^{2} e x}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {b d^{3} n \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 b d^{2} e n x \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b d^{2} e n x}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {3 b d e^{2} n x^{2} \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b d e^{2} n x^{2}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {3 b d e^{2} x^{2} \log {\left (c x^{n} \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} - \frac {b e^{3} n x^{3} \log {\left (\frac {d}{e} + x \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} + \frac {b e^{3} x^{3} \log {\left (c x^{n} \right )}}{6 d^{5} e^{2} + 18 d^{4} e^{3} x + 18 d^{3} e^{4} x^{2} + 6 d^{2} e^{5} x^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.00, size = 176, normalized size = 1.50 \begin {gather*} -\frac {b n x^{3} e^{3} \log \left (x e + d\right ) + 3 \, b d n x^{2} e^{2} \log \left (x e + d\right ) + 3 \, b d^{2} n x e \log \left (x e + d\right ) - b n x^{3} e^{3} \log \left (x\right ) - 3 \, b d n x^{2} e^{2} \log \left (x\right ) - b d n x^{2} e^{2} - b d^{2} n x e + b d^{3} n \log \left (x e + d\right ) + 3 \, b d^{2} x e \log \left (c\right ) + 3 \, a d^{2} x e + b d^{3} \log \left (c\right ) + a d^{3}}{6 \, {\left (d^{2} x^{3} e^{5} + 3 \, d^{3} x^{2} e^{4} + 3 \, d^{4} x e^{3} + d^{5} e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.86, size = 141, normalized size = 1.21 \begin {gather*} -\frac {a\,d+x\,\left (3\,a\,e-b\,e\,n\right )-\frac {b\,e^2\,n\,x^2}{d}}{6\,d^3\,e^2+18\,d^2\,e^3\,x+18\,d\,e^4\,x^2+6\,e^5\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d}{6\,e^2}+\frac {b\,x}{2\,e}\right )}{d^3+3\,d^2\,e\,x+3\,d\,e^2\,x^2+e^3\,x^3}-\frac {b\,n\,\mathrm {atanh}\left (\frac {2\,e\,x}{d}+1\right )}{3\,d^2\,e^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________